import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/home/index',
  },
  {
    path: '/home',
    name: 'homeView',
    component: HomeView,
    redirect: '/home/index',
    children: [
      {
        path: 'index',
        name: '/home/index',
        component: () => import('../views/IndexView.vue'),
      },
      {
        path: 'collect',
        name: '/home/collect',
        component: () => import('../views/Collect.vue'),
      },
      {
        path: 'classify',
        name: '/home/classify',
        component: () => import('../views/Classify.vue'),
      },
      {
        path: 'my',
        name: '/home/my',
        component: () => import('../views/My.vue'),
      },
      {

        path: "mylogin",
        name: '/home/mylogin',
        component: () => import('../views/Mylogin.vue')
      }, {

        path: "mysignup",
        name: '/home/mysigup',
        component: () => import('../views/Mysignup.vue')
      },
    




    ]
  },


  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
